<%@ page import="org.springside.core.Constants"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<fmt:message key="emails_portal_label1" var="emails_portal_label1"/>

<ff:boxportlet header="${emails_portal_label1}">
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="padding-left:5px">
	<tr>
		<td valign="top">
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="tbl_left_ico">
          <c:forEach var="email" items="${emails}" begin="0" end="4"> 
          <tr>
          <td> 
            <a href="#" 
            	onClick='mainJump("/modules/email2/email2.do?method=show&id=${email.id}&box=${email.emailBoxs.id}&accid=${email.emailBoxs.emailsAccount.emailAddress==null?'':email.emailBoxs.emailsAccount.id}&index=&query=","<%=Constants.USER_THEME_FRAME %>")'
	            title="${email.title==null?'':email.title}"> 
		          <c:if test="${email.isseen eq 0}">
        			<b>${fn:substring(email.title==null?'':email.title, 0, param.y)}.... </b>
        		  </c:if>
        		  <c:if test="${email.isseen ne 0}">
       				${fn:substring(email.title==null?'':email.title, 0, param.y)}....
       			  </c:if> 
			</a>
			<c:if test="${email.isseen eq 0}">
  				<img src="<c:url value="../../themes/${sessionScope.loginUser.theme}/home/images/new.gif"/>">
	        </c:if>
	        
	        <c:if test="${email.sendDate!=null}">
				<font color="#999999">(<fmt:formatDate value="${email.sendDate}" pattern="MM-dd HH:mm"/>)</font>
			</c:if>
		   </td>
        </tr>
        </c:forEach> 
        <c:if test="${fn:length(emails==null?'':emails)<1}"> 
        <tr> 
          <td>&nbsp;</td>
        </tr>
        </c:if> 
        <c:if test="${fn:length(emails==null?'':emails)<2}"> 
        <tr> 
          <td>&nbsp;</td>
        </tr>
        </c:if> 
        <c:if test="${fn:length(emails==null?'':emails)<3}"> 
        <tr> 
          <td>&nbsp;</td>
        </tr>
        </c:if> 
        <c:if test="${fn:length(emails==null?'':emails)<4}"> 
        <tr> 
          <td>&nbsp;</td>
        </tr>
        </c:if> 
        <c:if test="${fn:length(emails==null?'':emails)<5}"> 
        <tr> 
          <td>&nbsp;</td>
        </tr>
        </c:if> 
      </table>

      <table width="100%" height="17">
        <tr>
          <td>&nbsp;</td>
          <td width="30" class="tbl_more_ico_td">
          <a href="#" class="link_portlet" onClick='mainJump("/modules/email2/email2.do?method=list&box=inbox&ec_s_sendDate=desc","<%=Constants.USER_THEME_FRAME %>")'
         	title="<fmt:message key="common_more" />"><fmt:message key="common_more" /></a></td>
        </tr>
     </table>
     	</td>
	</tr>
</table>
</ff:boxportlet>    

